Chris Pollett >
Old Classses > |
HW#1 --- last modified February 07 2019 04:25:53..Due date: Feb 12
Files to be submitted: Purpose: To experiment with various kinds of texture mapping techniques. Related Course Outcomes:The main course outcomes covered by this assignment are: LO1 -- Create a program which generates a simple scene in OpenGL made up of polyhedra and quadrics LO4 -- Be able to draw a scene using various texture mapping techniques such as a basic texture map, a normal map, a cube map, or projector map. Specification: CS 216 students will do the assignment described below and in addition look up the following two papers in the library, read them and write a 1 page summary of what they got out of them. Blinn, J. F. and Newell, M. E. Texture and Reflection in Computer Generated Images. Communications of the ACM. Volume 19. Issue 10. pp. 542--547. Oct., 1976. Gardener, G. Y. Visual Simulation of Clouds. Computer Graphics. Volume 19. Issue 3. pp. 297--303. (Proceedings of SIGGRAPCH 1985.) For both CS116B and CS216 students, I would like you to code up some of the texture mapping techniques we are learning. Your starting point should be either the textbook's Hello World 3D example or your code from one of the projects you made in last semester's CS116a. At the center of your scene, I want you to draw an edge length 2, regular icosahedron centered at the origin. Notice the Wikipedia article gives you the Cartesian Coordinates of the edge length 2 version of this polyhedra. The camera should be initially positioned along the z-axis 10 units from the origin. Initially, each face of the polyhedra should be textured with an image of one of the team members on the project. Recall the book's code for your first assignment last semester has a way to read in an image file. Now imagine three vertices of an equilateral triangle on a sphere. A ray from the origin through the triangle will hit exactly one point on the sphere. That point on the sphere will have a normal, and we can use this to make the triangle into a normal map. When the user hits the `n` key, I want you to draw the scene with a light source 5 units above the viewing position, where the icosahedron is a shiny red material and where the normals used come from the normal map. Finally, I want you to create a background image for cube map purposes. If the user hits the `c` key, I want you to render the scene with the icosahedron now made of a shiny silver material with its usual normals (i.e., not coming from a normal map). The cube map should be used to draw for the background and reflections on this surface. Point Breakdown
|